<template>
  <div class="echarts-container">
  </div>
</template>

<script>
export default {
  data() {
    return {
      a: '000'
    }
  },
  methods: {
    async startIntro() {
      const confirm = await this.$confirm('是否显示引导内容', 'intro提示', {
        confirmButtonText: '开启',
        cancelButtonText: '取消',
        type: 'warning'
      }).catch(err => err)
      if(confirm !== 'confirm') return null
      this.$nextTick(() => {
        const introJS = require('intro.js')
        introJS().start()
      })
    }
  },
  created() {
    this.startIntro()
  },
  mounted() {
    const ec = document.querySelector('.echarts-container')
    const myEChart = this.$ecs.init(ec)
    const option = {}
    myEChart.setOption(option)
  }
}
</script>

<style>
  .echarts-container {
    height: 80vh;
    width: 100%;
  }
</style>
